#ifndef RECOGNITION_H
#define RECOGNITION_H

//////////////////////////////////////////////////////////////////////////
//  [11/7/2013 yy] block start
#define  KMEAN_2_CLUSTER_SUCCEED 22
#define  KMEAN_2_CLUSTER_ARRAY_EMPTY -23
#define  KMEAN_2_CLUSTER_NOT_ENOUGH_DATA  -24
#define  KMEAN_2_CLUSTER_MAX_INTERATION  -25

//  [11/7/2013 yy] block end
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
//  [10/25/2013 yy] block start
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <fstream>
//  [10/25/2013 yy] block end
//////////////////////////////////////////////////////////////////////////
#include "opencv2/opencv.hpp"
//#include "NoseTipLocalize.h"
using namespace cv;
using namespace std;




void detect_and_draw( IplImage* image ,CvRect * faceRect);
void equalizeLeftAndRightHalves(Mat &faceImg);
int kMean2ClusterCV(vector<CvPoint> arr,int *lable,CvPoint *cluster1,CvPoint* cluster2);
int alignFace(CvPoint cluster1,CvPoint cluster2,vector<CvPoint>nosepoints,CvRect *faceRect,IplImage *img,IplImage *face_img);
int objectDetectCV(vector<CvRect> &arr,IplImage* img,CvMemStorage* storage,CvHaarClassifierCascade* cascade,int windowSize);

//int noseTipLocalize(IplImage* img, CvRect * faceRect, CvPoint *lp, CvPoint *rp, CvPoint *tip);

//int getProjection(IplImage * img, int *p, char xy, CvRect *pRect);

#endif

